<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<c:set value="<%=request.getContextPath()%>" var="ctx"></c:set>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html>
<html>
<head>
<link href="${ctx}/decorators/css/plugins/datapicker/datepicker3.css"	rel="stylesheet">
<link href="${ctx}/decorators/css/plugins/chosen/chosen.css"	rel="stylesheet">
<script src="${ctx}/decorators/js/plugins/chosen/chosen.jquery.js"></script>
<script	src="${ctx}/decorators/js/plugins/datapicker/bootstrap-datepicker.js"></script>
<script type="text/javascript" src="${ctx}/assert/js/jquery.validate.min.js" ></script>
<meta charset="utf-8">
<title>产品信息页面</title>
</head>
<body>
      <div class="row">
            <div class="col-lg-12">
               <div class="row wrapper border-bottom white-bg ibox-title">
                         <div class="col-lg-11">
                             <h3>查看产品信息</h3>
                         </div>
                         <div class="col-lg-1">
                             <a class="btn btn-success btn-block" href="${ctx}/admin/productList">返回列表
                             </a>
                         </div>
                   </div>
                    
			      <div class="wrapper wrapper-content animated fadeInRight">
					      <div class="ibox-title clear">		     
							    <h5>
		                              <c:if test="${productView.product.logo!=null && not empty productView.product.logo}">
										<img alt="LOGO"width="50px" height="50px" src="${imageUrl}${productView.product.logo }"/> 
							          </c:if>
		                              <span style="height:45px;line-height:35px;">${productView.product.PName}</span>
						       </h5>
						 </div>
				       <div class="ibox-content">
						<div class="row">
								<div class="col-lg-4">
						           <%-- <p>
						           	<img alt="VIDEOIMG" src="${imageUrl}${productView.product.videoImg }" id="uploadVideoImg"  width="100%"/>
						           </p> --%>
						           <div class="float-e-margins">
				                        <div class="carousel slide" id="carousel2">
				                            <ol class="carousel-indicators">
				                              <c:forEach var="img" items="${imgList }" varStatus="status">
				                              	
				                                <c:if test="${status.index == 0}">
					                                <li data-slide-to="${status.index }" data-target="#carousel2" class="active"></li>
				                                </c:if>
				                                <c:if test="${status.index > 0}">
					                                <li data-slide-to="${status.index }" data-target="#carousel2"></li>
				                                </c:if> 
				                    
				                              </c:forEach>
				                            </ol>
				                            <div class="carousel-inner">
				                            
				                            	<c:forEach var="img" items="${imgList }" varStatus="status">
				                       		
			                            			<c:if test="${status.index == 0}">
					                            		<div class="item active">
						                                    <img alt="image" class="img-responsive" src="${imageUrl}${img.img }"  width="100%" style="height:460px !important;"/>
						                                    <div class="carousel-caption">
						                                        <p></p>
						                                    </div>
						                                </div>
			                            			</c:if> 
			                            			<c:if test="${status.index > 0 }">
				                            			<div class="item">
						                                    <img alt="image" class="img-responsive" src="${imageUrl}${img.img }" width="100%" style="height:460px !important;"/>
						                                    <div class="carousel-caption">
						                                        <p></p>
						                                    </div>
						                                </div>
			                            			</c:if>
				                            		
				                            	</c:forEach>
				                            	
				                               <!--  <div class="item active">
				                                    <img alt="image" class="img-responsive" src="http://www.zi-han.net/theme/hplus/img/p_big3.jpg">
				                                    <div class="carousel-caption">
				                                        <p>This is simple caption 1</p>
				                                    </div>
				                                </div> -->
				                                
				                            </div>
				                             <c:if test="${imgList != null && not empty imgList}">
					                            <a data-slide="prev" href="carousel.html#carousel2" class="left carousel-control">
			                                        <span class="icon-prev"></span>
			                                    </a>
			                                    <a data-slide="next" href="carousel.html#carousel2" class="right carousel-control">
			                                        <span class="icon-next"></span>
			                                    </a>
				                            </c:if> 
				                        </div>
				                </div>
								</div>
								<div class="col-lg-8">
		              			   <p><strong>品牌：</strong>${productView.product.brand }</p>
					               <p><strong>生产许可证：</strong>${productView.product.PLicense }</p>
					               <p><strong>参考价格(单位/元)：</strong>${productView.product.referPrice }</p>
					               <p><strong>产地：</strong>${productView.product.producePlace }</p>
					               <p><strong>生产日期：</strong><fmt:formatDate value="${productView.product.produceDate}" pattern="yyyy-MM-dd"/></p>
					               <p><strong>保质期（单位/天）：</strong>${productView.product.keepTime }</p>
									<p><strong>配料：</strong>  ${productView.product.dosing }</p>
									<p><strong>营养成分：</strong>${productView.product.nutrient }</p>
									<p><strong>模板编号：</strong>${productView.product.templateCode }</p>
									 <p>	
										<c:if test="${productView.product.videoType eq 0 || productView.product.videoType eq null || empty productView.product.videoType }">						
											<c:if test="${productView.product.video != null && not empty productView.product.video}">  
						                       <video  poster="" controls="" crossorigin="" style="width:400px !important;"><!--poster：图片-->
	                       							 <source src="<%=basePath %>uploadVideo/${ productView.product.video }" type="video/mp4">
                   								</video> 
											</c:if>
								
										</c:if>		
										<c:if test="${productView.product.videoType eq 1 }">
											<c:if test="${productView.product.video != null && not empty productView.product.video}">
											<strong>视频地址：</strong>${productView.product.video}<a href="http://${ productView.product.video}" target="_blank">打开链接</a> 
											</c:if>					
										</c:if>	
									 </p>
										<c:if test="${productView.extraColumnList != null && not empty productView.extraColumnList}">
											<c:forEach var="ec" items="${productView.extraColumnList }"   varStatus="status">
												<p>
												 <strong>${ec.cName }：</strong>${ec.cValue }
								    			</p>
											</c:forEach>
									    </c:if>
								</div>					
						</div>

	
			               </div>
			          </div>
			      </div>
	          </div>
</body>
</html>
